package cn.jiyun.ai.controller;

import cn.jiyun.ai.common.Result;
import cn.jiyun.ai.pojo.vo.QuestionReqSearchVo;
import cn.jiyun.ai.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/question/")
public class QuestionController {
    @Autowired
    QuestionService questionService;

    @PostMapping("findQuestionList")
    public Result findQuestionList(@RequestBody QuestionReqSearchVo questionReqSearchVo){
        return questionService.findQuestionList(questionReqSearchVo);
    }

    @PostMapping("selectQuestionById/{id}")
    public Result selectQuestionById(@PathVariable("id") Integer id){
        return questionService.selectQuestionById(id);
    }
}
